Component org.nuxeo.elasticsearch.ElasticSearchComponent
In bundle org.nuxeo.elasticsearch.core
Implementation
Class:
org.nuxeo.elasticsearch.ElasticSearchComponent
Services
- org.nuxeo.elasticsearch.api.ElasticSearchService
- org.nuxeo.elasticsearch.api.ElasticSearchAdmin
- org.nuxeo.elasticsearch.api.ElasticSearchIndexing
Extension Points
XML Source
<?xml version="1.0"?>
<component name="org.nuxeo.elasticsearch.ElasticSearchComponent" version="1.0">
<require>org.nuxeo.ecm.core.repository.RepositoryServiceComponent</require>
<implementation class="org.nuxeo.elasticsearch.ElasticSearchComponent" />
<service>
<provide interface="org.nuxeo.elasticsearch.api.ElasticSearchService" />
<provide interface="org.nuxeo.elasticsearch.api.ElasticSearchIndexing" />
<provide interface="org.nuxeo.elasticsearch.api.ElasticSearchAdmin" />
</service>
<extension-point name="elasticSearchEmbeddedServer">
<documentation>
Extension point to setup an embedded Elasticsearch instance.
It creates a local node using the same JVM as Nuxeo.
This is a test configuration and must NOT be used in production,
it is limited to one shard and no replica.
<code>
<elasticSearchLocal clusterName="MyCluster" httpEnabled="true" indexStoreType="mmapfs"
nodeName="MyNuxeo" pathData="/var/lib/nuxeo/elasticsearch/" />
</code>
Please refer to the Elasticsearch node configuration
clusterName is the cluster.name
nodeName is the node.name, default to nuxeoNode
pathData is the path.data
indexStoreType is the index.store_type
httpEnabled is the node.enable_http
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchEmbeddedServerConfig" />
</extension-point>
<extension-point name="elasticSearchClient">
<documentation>
Extension point to define how to access the Elasticsearch cluster.
For the TransportClient protocol:
<code>
<elasticSeachClient class="org.nuxeo.elasticsearch.client.ESTransportClientFactory">
<option name="addressList">localhost:9300</option>
<option name="clusterName">elasticsearch</option>
<option name="clientTransportSniff">false</option>
<option name="clientTransportIgnoreClusterName">false</option>
<option name="clientTransportPingTimeout">5s</option>
<option name="clientTransportNodesSamplerInterval">5s</option>
</elasticSeachClient>
</code>
For a Rest client:
<code>
<elasticSeachClient class="org.nuxeo.elasticsearch.client.ESRestClientFactory">
<option name="addressList">localhost:9200</option>
</elasticSeachClient>
</code>
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchClientConfig" />
</extension-point>
<extension-point name="elasticSearchIndex">
<documentation>
Extension point used to setup an Elasticsearch index.
The one used to index Nuxeo documents must be of type "doc".
<code>
<elasticSearchIndex name="nuxeo" create="true" type="doc">
<settings></settings>
<mapping></mapping>
<fetchFromSources>
<include>ecm:*</include>
<include>dc:*</include>
<exclude>ecm:binaryFulltext</exclude>
</fetchFromSources>
</elasticSearchIndex>
</code>
@Since 5.9.3
name is the Elasticsearch index name.
type is the Elasticsearch type that hold a mapping, "doc" is the mapping
for Nuxeo documents
create can be set to false if you don't want Nuxeo to initialize the index
and mapping.
settings the Elasticsearch settings
@see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html
mapping the Elasticsearch mapping for the type
@see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping.html
@Since 5.9.5
fetchFromSources, include a list of field name pattern that will be included
when fetching document from Elasticsearch (@see NxQueryBuilder.fetchFromElasticsearch)
use the exclude list to prevent returning fulltext or long fields.
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig" />
</extension-point>
<extension-point name="elasticSearchDocWriter">
<documentation>
Extension point used to setup the writer used when a document is indexed.
Must extend the JsonESDocumentWriter class.
<code>
<writer class="org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter" />
</code>
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchDocWriterDescriptor" />
</extension-point>
</component>